package com.vdf.sisconsolid.persistencemodule.converter;

import java.util.ArrayList;
import java.util.List;

import com.vdf.sisconsolid.persistencemodule.dto.KeyValueBean;
import com.vdf.sisconsolid.persistencemodule.model.Family;

public class FamilyConverter {

	public static List<KeyValueBean> toFamilyKeyValue(List<Family> familyList) {
		List<KeyValueBean> familyBeanList = new ArrayList<KeyValueBean>();
		for (Family family : familyList) {
			KeyValueBean familyBean = new KeyValueBean();
			familyBean.setKey(family.getId());
			familyBean.setValue(family.getName());

			familyBeanList.add(familyBean);
		}
		return familyBeanList;
	}
}
